package com.ruoyi.calculation.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.calculation.mapper.ErpCostCalculationMapper;
import com.ruoyi.calculation.domain.ErpCostCalculation;
import com.ruoyi.calculation.service.IErpCostCalculationService;

/**
 * 成本核算Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-21
 */
@Service
public class ErpCostCalculationServiceImpl implements IErpCostCalculationService 
{
    @Autowired
    private ErpCostCalculationMapper erpCostCalculationMapper;

    /**
     * 查询成本核算
     * 
     * @param workOrder 成本核算主键
     * @return 成本核算
     */
    @Override
    public ErpCostCalculation selectErpCostCalculationByWorkOrder(String workOrder)
    {
        return erpCostCalculationMapper.selectErpCostCalculationByWorkOrder(workOrder);
    }

    /**
     * 查询成本核算列表
     * 
     * @param erpCostCalculation 成本核算
     * @return 成本核算
     */
    @Override
    public List<ErpCostCalculation> selectErpCostCalculationList(ErpCostCalculation erpCostCalculation)
    {
        return erpCostCalculationMapper.selectErpCostCalculationList(erpCostCalculation);
    }

    /**
     * 新增成本核算
     * 
     * @param erpCostCalculation 成本核算
     * @return 结果
     */
    @Override
    public int insertErpCostCalculation(ErpCostCalculation erpCostCalculation)
    {
        return erpCostCalculationMapper.insertErpCostCalculation(erpCostCalculation);
    }

    /**
     * 修改成本核算
     * 
     * @param erpCostCalculation 成本核算
     * @return 结果
     */
    @Override
    public int updateErpCostCalculation(ErpCostCalculation erpCostCalculation)
    {
        return erpCostCalculationMapper.updateErpCostCalculation(erpCostCalculation);
    }

    /**
     * 批量删除成本核算
     * 
     * @param workOrders 需要删除的成本核算主键
     * @return 结果
     */
    @Override
    public int deleteErpCostCalculationByWorkOrders(String[] workOrders)
    {
        return erpCostCalculationMapper.deleteErpCostCalculationByWorkOrders(workOrders);
    }

    /**
     * 删除成本核算信息
     * 
     * @param workOrder 成本核算主键
     * @return 结果
     */
    @Override
    public int deleteErpCostCalculationByWorkOrder(String workOrder)
    {
        return erpCostCalculationMapper.deleteErpCostCalculationByWorkOrder(workOrder);
    }
}
